package models.pubobj;

import java.util.List;

import javax.persistence.*;

import models.*;
import play.db.ebean.Model;

@Entity
public class AniHttpMethod extends Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2965343779404433156L;

	@Id
	public Long id;
	
	public String httpMethodKey;

    public AniHttpMethod(Long id) {
        this.id = id;
    }

    public AniHttpMethod(String httpMethodKey) {
		super();
		this.httpMethodKey = httpMethodKey;
	}
	
	public AniHttpMethod(Long id, String httpMethodKey) {
		super();
		this.id = id;
		this.httpMethodKey = httpMethodKey;
	}
	
	
	
	public static Model.Finder<Long, AniHttpMethod> find = new Finder<Long, AniHttpMethod>(Long.class, AniHttpMethod.class);
	
	public static List<AniHttpMethod> findAll() {
        return find.all();
    }

    public static AniHttpMethod findByHttpMethodKey(String methodKey) {
        return find.where().eq("httpMethodKey", methodKey).findUnique();
    }
    public static AniHttpMethod findById(Long httpMethodId){
        return find.byId(httpMethodId);
    }
}
